<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Sys_shortlinkconfig.js此处编写
 -->
<template>
  <div>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormFileds="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/Sys_shortlinkconfig.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "短链配置",
        name: "Sys_shortlinkconfig",
        url: "/Sys_shortlinkconfig/",
        sortName: "id"
      },
      extend: extend,
      editFormFields: {
        title: "",
        type: "",
        goods: "",
        producttype: [],
        distributionid: [],
        merchantCode: "",
        merchantName: "",
      },
      editFormOptions: [
        [{ title: "标题", field: "title", type: "text", required: true }],
        [
          {
            title: "类型",
            field: "type",
            dataKey: "",
            data: [],
            type: "radio",
            required: true
          }
        ],
        [
          {
            dataKey: "distributorList",
            data: [],
            title: "分销商",
            field: "distributionid",
            type: "select",
            required: true
          }
        ],
        [
          {
            dataKey: "",
            data: [],
            title: "产品类型",
            field: "producttype",
            type: "cascaderEl",
            multiple: true,
            required: true
          }
        ],
        [
          {
            dataKey: "",
            data: [],
            title: "商品",
            field: "goods",
            type: "select",
            required: true
          }
        ],

      ],
      searchFormFields: { title: "" },
      searchFormOptions: [[{ title: "标题", field: "title", type: "text" }]],
      columns: [
        {
          field: "id",
          title: "id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left"
        },
        {
          field: "distributionid",
          title: "分销商",
          type: "string",
          width: 220,
          align: "left",
          sortable: true,
          bind: { key: "distributorList", data: [] }
        },
        {
          field: "title",
          title: "标题",
          type: "string",
          width: 220,
          align: "left",
          sortable: true
        },
        {
          field: "code",
          title: "编码",
          type: "string",
          width: 220,
          align: "left"
        },
        {
          field: "type",
          title: "类型",
          type: "int",
          bind: { key: "", data: [] },
          width: 90,
          align: "left"
        },
        {
          field: "goods",
          title: "商品",
          type: "string",
          width: 220,
          align: "left"
        }
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: ""
      }
    };
  },
};
export default vueParam;
</script>
